import React, { Component } from 'react';
import { connect } from 'react-redux';
import './brandIntroduction_banner.scss';

class BrandIntroductionBanner extends Component {
    render() {
        return (
            <div className="brandIntroduction_banner">
                <img src={this.props.Banner_url} alt="" />
            </div>
        )
    }
}

const mapStateToProps = (state) => {
    let Banner_key = state.brandIntroduction_store.index;
    let Banner_url = '';
    switch (Banner_key) {
        case 1:
            Banner_url = require('../../../static/img/brandIntroduction/banner-1.jpg');
            break;
        case 2:
            Banner_url = require('../../../static/img/brandIntroduction/banner-2.jpg');
            break;
        case 3:
            Banner_url = require('../../../static/img/brandIntroduction/banner-3.jpg');
            break;
        case 4:
            Banner_url = require('../../../static/img/brandIntroduction/banner-4.jpg');
            break;
        case 5:
            Banner_url = require('../../../static/img/brandIntroduction/banner-5.jpg');
            break;
        default:
            break;
    }
    return {
        Banner_url: Banner_url
    }
}

export default connect(mapStateToProps)(BrandIntroductionBanner);